﻿using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;

namespace CoreEx.Common.Validation
{
    /// <summary>
    /// Represents a class that is capable of determining a set of 
    /// </summary>   
    public interface ITargetPropertyResolver
    {
        /// <summary>
        /// Tries to determine the target property or properties that the validation <paramref name="expression"/> applies to.
        /// </summary>
        /// <param name="expression">The validation expression</param>
        /// <returns>An <see cref="IEnumerable{T}"/> that contains the target properties.</returns>
        IEnumerable<PropertyInfo> ResolveFrom(Expression expression);
    }
}
